/**
 * 中文字体显示库
 * 支持UTF-8编码的汉字显示
 */

#ifndef __CHINESE_FONT_H__
#define __CHINESE_FONT_H__

#include "main.h"

// 字体大小定义
#define FONT_WIDTH_16    16
#define FONT_HEIGHT_16   16
#define FONT_WIDTH_12    12
#define FONT_HEIGHT_12   12

// 汉字字库结构
typedef struct {
    uint32_t unicode;           // Unicode编码
    const uint8_t *data;        // 字模数据指针
} ChineseChar_t;

// 函数声明
void ChineseFont_Init(void);
uint8_t ChineseFont_GetCharData(uint32_t unicode, const uint8_t **data);
void ChineseFont_DisplayChar(uint8_t x, uint8_t y, uint32_t unicode);
void ChineseFont_DisplayString(uint8_t x, uint8_t y, const char *str);
uint8_t ChineseFont_GetUTF8Length(const char *str);
uint32_t ChineseFont_UTF8ToUnicode(const char *utf8, uint8_t *len);

#endif /* __CHINESE_FONT_H__ */
